1. Field of the Invention
The present invention relates to a method of processing stored data containing parity data, and more particularly, to a method of storage management that allows data and its associated parity data to be written more quickly.
2. Description of the Prior Art
In current computer systems, central processing units (CPU) are attaining higher speeds for better system performance. However, when a CPU has to access data from a peripheral device such as a hard disk, this input/output (I/O) process seriously affects system performance because it requires mechanical motion such as moving the magnetic heads as data is being stored/read on the hard disk.
To eliminate the disadvantageous effect of accessing data on a hard disk, the conventional practice is to store data on multiple magnetic disks known as disk arrays. The use of a disk array increases the input/output bandwidth and improves the input/output performance.
To secure the integrity of the data stored in such multiple disk systems, a redundant magnetic disk is commonly added to the disk array in order to store parity data. This arrangement allows the integrity of the stored data to be enhanced without the need for a single, large and more expensive disk. This type of system is referred to as Redundant Arrays of Inexpensive Disks (RAID).
In RAID systems, there is a distinction made among grades, based on differences in performance. For example, in the RAID4 arrangement shown in FIG. 1, there are five magnetic disks D0, D1, D2, D3, and D4. Magnetic disk D0 is dedicated to storing the parity data P00, P10, P20, P30, and P40 associated with the data stored in disks D0, . . . , D4. The parity data P00-P40 stored in sectors S0-S4 is obtained by executing an Exclusive-Or operation (indicated here by the symbol "+") between the data located in each of the remaining disks D1, . . . , D4 which is associated with a given storage sector. In other words, where DATAsd represents the Data in Sector s of disk d, and Psd represents the parity data for sector s which is stored on disk d,
P00=DATA01+DATA02+DATA03+DATA04;
P10=DATA11+DATA12+DATA13+DATA14;
P20=DATA21+DATA22+DATA23+DATA24;
P30=DATA31+DATA32+DATA33+DATA34; and
P40=DATA41+DATA42+DATA43+DATA44.
If a block of data in a storage sector SO is erased, then the erased data can be restored by performing an Exclusive-Or operation between the remaining data located on the same sector of the other disks and the parity data associated with that storage sector. For example, if DATA02 on disk D2 is erased, it may be recovered by performing an Exclusive-Or operation on the remaining data DATA01, DATA03, and DATA04, and the parity data P00 which is associated with sector S0. This may be shown as follows:
______________________________________ P00 + (DATA01 + DATA03 + DATA04) = (DATA01 + DATA02 + DATA03 + DATA04) + (DATA01 + DATA03 + DATA04) = DATA02 ______________________________________
In the above-mentioned RAID4 system it is possible, within a very short time, to modify data on the same sector of different disks, such as DATA01 and DATA03 which are in one storage sector, S0, and also to modify data, such as DATA14, in another storage sector, S1. Because the data in this example DATA01, DATA03, DATA14 is stored separately on different magnetic disks D1, D3, D4, it is possible to almost simultaneously modify the above-mentioned data, without requiring a wait state for moving the magnetic head several times and for other mechanical motions which would be required if the data were all stored on a single larger disk.
As shown in FIG. 1, when modifying the data in storage sectors S0 and S1, the related parity data P00 and P10, respectively, should also be modified in order to maintain data integrity. However, since the two sectors of parity data, P00 and P10, are within the same magnetic disk D0 as one another, a wait state is required for moving the magnetic head and for other mechanical motions of the magnetic disk D0.
FIG. 2A shows the RAID5 system. It differs from the RAID4 system in that the parity data is sequentially distributed in each magnetic disk. Thus, it is possible to almost simultaneously modify data in most storage locations during a request. Since the parity data P00, P11, P22, P33, P44 is not located in one magnetic disk, it is possible to save the wait state for the time formerly spent in moving the magnetic head and in other mechanical motions of the disk. Therefore, RAID5 has higher system efficiency than that of RAID4. Examples of RAID systems are described in "DISK SYSTEM ARCHITECTURES FOR HIGH PERFORMANCE COMPUTING", Randy H. Katz, Garth A. Gibson, and David A. Patterson, IEEE: PROCEEDINGS OF THE IEEE, VOL. 77, NO. 12, DECEMBER 1989, which is incorporated herein by reference.
From the above descriptions of the conventional techniques, the key factor affecting system performance is the wait state associated with mechanical motions during the accessing of magnetic disks. Therefore, if the number of times that the magnetic disk is accessed can be reduced, the overall system performance can be improved.
Consequently, there is a need for a method for writing the data to the magnetic disks faster by reducing the magnetic disk access time.